Memory-Efficient Abstractions for Pathfinding
نویسنده
چکیده
From an academic perspective there has been a lot of work on using state abstraction to speed path planning. But, this work often does not directly address the needs of the game development community, specifically for mechanisms that will fit the limited memory budget of most commercial games. In this paper we bring together several related pieces of work on using abstraction for pathfinding, showing how the ideas can be implemented using a minimal amount of memory. Our techniques use about 3% additional storage to compute complete paths up to 100 times faster than A*. Introduction and Overview Pathfinding is a key task in many domains, including video games. In games in particular, computers must compute a path between two points as efficiently as possible, as there many are many other demands on the CPU, such as physics, graphics, and even additional pathfinding tasks from other units (agents). We present a new method to build automated, minimal-memory state abstractions to speed pathfinding. With just 3% additional storage, we show large reductions in computational costs. State abstractions for pathfinding have been explored by in a variety of different settings using a variety of methods for abstraction (Holte et al. 1996a; 1996b; Tozour 2003; Sturtevant & Buro 2005; Botea, Müller, & Schaeffer 2004). This paper describes in detail how state abstraction techniques can be optimized for use in games which have tight memory constraints. Specifically, this work is the product of a successful collaboration between BioWare Corp R © and our university. According to Mark Brockington, Programming Fellow for BioWare Corp R ©, “Our collaboration with the University of Alberta on this project has been successful, and we are pleased with the performance and implementation of their pathfinding research within Dragon AgeTM.” Abstraction For Pathfindingion For Pathfinding Automatic state abstractions are able to take a highresolution map of the world and automatically transform it into a smaller, more abstract map, which can be used to speed pathfinding in the actual world environment. Copyright c © 2007, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. The concept of using some sort of abstraction for pathfinding is a natural one, as humans often use abstractions to reason about the world. A long car trip does not being with minute-by-minute planning of the expected route. Instead, a general plan is composed which includes the start and goal cities and a high-level route between these cities. One may, for instance, decide whether to travel from Los Angeles to San Francisco by taking the faster but less scenic interstate or to take the scenic drive up the coast at the cost of additional time. Once this high-level decision has been made, it is up to the driver of the car to make low-level decisions such as which lane to drive in and how and when to pass other cars on the road. Once a high-level route is known, pathfinding becomes a local operation. It is sufficient to plan the next few steps leading along the high-level abstract route as they guarantee that the goal will be reached. This is an ideal feature when running in environments which tightly limit computation costs. The approach of first planning an abstract path before refining it has been considered in a variety of forms (Holte et al. 1996b; Sturtevant & Buro 2005; Botea, Müller, & Schaeffer 2004) and in a variety of domains (G.R. Jagadeesh 2002; Yang, Tenenberg, & Woods 1996). In this paper we address the issue of automatically building a state abstraction from an underlying map representation in a memory efficient manner. We then demonstrate the performance of our implementation in terms of memory used, pathfinding speed, and resulting path optimality. Efficient Abstraction Implementation We first describe how we can represent a map in a memory efficient manner, and then demonstrate how the representation can be used for pathfinding. Computing Abstract Map One common representation of a map is a simple grid, where a grid cell is the smallest unit of space that can be occupied by a single unit within the world. This is the underlying representation that BioWare Corp R © decided to use for their maps in Dragon AgeTM. In one respect this representation is efficient, as there is a simple mapping between x/y coordinates and grid cells, avoiding the memory cost of using pointers. But for large maps, the total memory usage and
منابع مشابه
Improving Collaborative Pathfinding Using Map Abstraction
In this paper we combine recent pathfinding research on spatial abstractions, partial refinement, and space-time reservations to construct new collaborative pathfinding algorithms. We first present an enhanced version of WHCA* and then show how the ideas from WHCA* can be combined with PRA* to form CPRA*. These algorithms are shown to effectively plan trajectories for many objects simultaneousl...
متن کاملEfficient Triangulation-Based Pathfinding
Pathfinding for commercial games is a challenging problem, and many existing methods use abstractions which lose details of the environment and compromise path quality. Conversely,ions which lose details of the environment and compromise path quality. Conversely, humans can ignore irrelevant details of an environment that modern search techniques still consider, while maintaining its topography...
متن کاملDHPA* and SHPA*: Efficient Hierarchical Pathfinding in Dynamic and Static Game Worlds
In 2004, Botea et al. published the HPA* algorithm (Hierarchical Pathfinding A*), which is the first detailed study of hierarchical pathfinding in games. However, HPA* can be optimized. In this paper, we introduce the DHPA* and SHPA* hierarchical pathfinding algorithms, along with a metric for comparing the dynamic performance of pathfinding algorithms in games. We show that DHPA* searches up t...
متن کاملHPA* Enhancements
In video games, pathfinding must be done quickly and accurately. Not much computational time is allowed for pathfinding, but realistic looking paths are required. One approach to pathfinding which attempts to satisfy both of these constraints is to perform pathfinding on abstractions of the map. Botea et al.’s Hierarchical Pathfinding A* (HPA*) does this by dividing the map into square sectors ...
متن کاملMemory abstractions for parallel programming
A memory abstraction is an abstraction layer between the program execution and the memory that provides a different “view” of a memory location depending on the execution context in which the memory access is made. Properly designed memory abstractions help ease the task of parallel programming by mitigating the complexity of synchronization or admitting more efficient use of resources. This di...
متن کامل